The present invention relates to a method and apparatus for demodulating data signals recorded on magnetic cards, etc., by which data recorded by a two-frequency encoding method can be demodulated with high reliability.
General recording/reproducing devices such as magnetic card readers use a modulation method by which binary data signals composed of a combination of two kinds of frequencies, F and 2F, are stored in memory. The data recorded by the modulation method is reproduced in the following manner: a magnetic head is moved relative to a magnetic stripe on a magnetic card to reproduce the magnetically recorded data in a form of an analog reproduced signal; based on the signal waveform of the analog reproduced signal, the binary data are demodulated.
A magnetic stripe of a general magnetic card has not only a significant data region in which a recorded data is substantially stored, but also a sync bit region that comes before the significant data region, an STX code region that indicates the beginning of the recorded data, an ETX code region that comes after the significant data region and indicates the end of the data, an LRC code region, and another sync bit region.
FIG. 18 illustrates a general functional block diagram of a conventional data demodulation of this kind, and FIG. 19 shows a signal waveform of each block. In FIG. 18, an output signal of the magnetic head 11, which is obtained when a magnetic card 10 moves relative to the magnetic head, is amplified by two amplifiers 12 and 15. An output signal of the amplifier 12 is supplied to a peak detecting circuit 13 for peak detection, and a peak detection signal of the peak detecting circuit 13 is compared to zero level by a comparator 14 to detect zero crossing points thereof. An output signal of the other amplifier 15 is compared to zero level by a comparator 16 to detect zero crossing points thereof, and its output is input to a timing generation circuit 17. The timing generation circuit 17 changes the output level of the comparator 16 according to the level of the output signal of the comparator 16 which is observed at changing positions of the output signal of the comparator 14. The output signal of the timing generation circuit 17 is input to a data discriminating circuit or CPU 18 for a predetermined signal process to identify the character.
The operation of the functional block diagram illustrated in FIG. 18 will be described more specifically referring to FIG. 19 as well. FIG. 19(a) illustrates an example of a signal recorded on the magnetic card 10. The recorded signal is a binary data signal composed of a combination of two kinds of frequencies, F and 2F, and expresses the bit by xe2x80x9c0xe2x80x9d or xe2x80x9c1xe2x80x9d according to the existence of inversion of signal polarity within a time interval (distance) T equal to one bit. The example of FIG. 19(a) expresses xe2x80x9c01101xe2x80x9d. FIG. 19(b) shows an example of the recorded signal of FIG. 19(a) which is read by the magnetic head 11 and amplified by the amplifiers 12 and 15. The output frequency of the amplifier 12 and 15 which corresponds to the recorded signal xe2x80x9c1xe2x80x9d is twice as long as that which corresponds to the recorded signal xe2x80x9c0xe2x80x9d.
The peak detecting circuit 13 is composed of a differentiating circuit. Therefore, the peak detection output provides a signal waveform, as illustrated in FIG. 19(c) and, in which the zero crossing points appear at the peak positions of the output signal of the amplifier 12. This signal is compared to zero level by the comparator 14 and converted to a digital signal which inverts at the zero crossing positions in the peak detection waveform as illustrated in FIG. 19(d). The output waveform of the amplifier 15 is compared to zero level by the comparator 16 and converted to a digital signal which inverts at the zero crossing positions thereof, as illustrated in FIG. 19(e). The timing generation circuit 17 outputs the signal as illustrated in FIG. 19(f). In other words, the timing generation circuit 17 changes the output level of the comparator 16 according to the level of the output signal of the comparator 16 which is observed the comparator 16 at changing positions of the output signal of the comparator 14. The signal as illustrated in FIG. 19(f) is the digital signal expressing xe2x80x9c01101xe2x80x9d the same as that by the signal of FIG. 19(a). Thus, it is understood that the data signal recorded on the magnetic card is demodulated.
The above mentioned performance of reading data recorded on magnetic cards is affected by the condition of card, contamination and wear of the magnetic head, electric noise or mechanical noise from a motor, etc. In other words, a recording medium such as magnetic cards receives various stresses over repetitive use; as a result, the contamination or scratches on the recording medium may cause signals that originally did not exist. Also, basic information once written on the recording medium will not be overwritten even with repetitive use; over the time that the recording medium makes repeated contacts with the magnetic head, the magnetic force decreases, and therefore the signal intensity necessary for reproduction becomes insufficient, degrading accuracy of data reading. Further, the resolution power of the magnetic head is decreased due to wear of the magnetic head, causing peak shifts.
If the data read waveform has an abnormal portion as above, the performance of reading data recorded on the medium may be degraded, affecting correct data identification. Also, if peaks that originally do not exist appear or peaks appear at unexpected positions, the number of bits is falsely read because the abnormal waveform is decoded as it is, and the boundaries between the bits are shifted, affecting the successive bits in the character interval (distance) and causing a false reading therein.
In the aforementioned modulating method, as illustrated in FIG. 2, a constant reference time xcex1T (where 0xe2x89xa6xcex1xe2x89xa61, i.e., xcex1=0.8) is set with respect to a time interval (distance) T equal to one bit, and xe2x80x9c0xe2x80x9d or xe2x80x9c1xe2x80x9d is allocated to the bit by observing polarity inversion in the read signal within the reference time xcex1T. In other words, if there is no polarity inversion within the reference time xcex1T, the bit is defined as xe2x80x9c0xe2x80x9d by the frequency F; if there is a polarity inversion within the reference time xcex1T, the bit is defined as xe2x80x9c1xe2x80x9d by the frequency 2F. With this, the influence by the peak shift can be prevented to some extent.
However, like the example of FIG. 2, even if the reference time xcex1T is set and the bit is identified by observing polarity inversion of the read signal within the reference time xcex1T, the aforementioned factors, such as peaks that originally do not exist or peaks appearing at unexpected positions, may cause a false reading.
Also, if a false reading occurs on only one bit in the bit line, it affects the successive bit line, causing errors in character determination. Then, the present inventors filed a patent application of a data demodulating method by which a false reading on one bit does not affect successive bit line. This invention is described in the specifications and drawings of prior Applications in which the binary data for each bit is determined by using an element of a character time interval for one character, which is determined by a reasonable method, thus reducing false readings and providing a highly reliable data demodulation.
Also, the present inventors have proposed a method for demodulating data for one character, in which each of peak interval values from the peak interval value line is successively added to determine the end of one character, two kinds of bit lines are obtained by comparing each of the peak interval values that constitute one character with the reference value in the right and opposite directions of sequence, and the data for one character is demodulated based on the two kinds of bit lines.
The present inventors have also proposed a data demodulating method in which a set of ideal reference waveform data of reproduced signal waveforms are prepared in advance for characters; a reproduced signal corresponding to the magnetically recorded data is divided into segments, each of which has the length equal to one character; at least one of the segments is compared to each of said reference waveform data by a pattern matching to determine the degrees of similarities; and the character corresponding to the reference waveform data showing the highest degree of similarity is determined as the character expressed by the segment in a prior application.
According to the inventions of the above patent applications, reliability of data demodulation can be increased. However, even the above inventions may have difficulties to correctly read recorded data on a recording medium depending on the condition of abnormality of the read signal. As shown in FIG. 4, if there are peak shifts in the read signal waveform, the original binary data line pattern for one character, xe2x80x9c01110xe2x80x9d, for example, may be falsely read as xe2x80x9c00111xe2x80x9d Consequently, the character may falsely be selected for the segment. Thus, a measure for errors is needed. Also, in the example of FIG. 4, as a result of false bit conversion on the second bit, the ends of the bits after the third bit are shifted, thus affecting the successive bits in the character interval. Thus, false readings may be caused on the successive bits in the character interval. Therefore, the inventions of the above patent applications can be more improved.
The present invention is devised considering the above problems in prior art. An objective thereof is to provide highly reliable data demodulating method and data demodulating apparatus, by which even when a read signal waveform includes peak shifts, recorded data can be accurately demodulated and false readings are greatly reduced.